//
//  Employees.h
//  A One POS
//
//  Created by AonePOS on 24/09/13.
//  Copyright (c) 2013 AonePOS. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "Employeepagination.h"
#import "EmployeeCell.h"
@interface Employees : UIViewController<UITextFieldDelegate,UITableViewDataSource,UITableViewDelegate,NSURLConnectionDataDelegate>
{
  
    UIView *sidemenu,*mainview,*backgroundcolorview;
    UIButton *categorybutton;
    UIToolbar *downtoolBar,*maintoolBar;
    UIImageView *logobackview,*logoimageview;
    int y,p;
    _Bool isLandScope;
    UIButton *helpiconButton,*logouticonButton,*menubutton;
    BOOL menuslected;
    UIButton *backButton3,*backButton2,*backButton;
    UINavigationBar *navBar;
    
    UIView *EmployeesBackView;
    UIScrollView *AddEmployeesView;
    UIButton  *AddEmployeeBtn,*EditEmployeeBtn;
    
    UIButton *DepartmentBtn;
    UILabel *EmployeeIdLbl,*Passwordlbl,*Displaynamelbl,*CardSwipeIdlbl,*CustomerLbl,*Houlrywagelbl,*Departmentlbl;
    UITextField *EmployeeIdField,*PasswordField,*DisplaynameField,*CardSwipeIdField,*CustomerField,*HoulrywageField;
    UIButton *EmployeeInfoBtn;
     UITableView *DepartmentListTable;
    NSMutableArray *DepartmentsArray;
    UILabel *Disablelbl,*administrativelbl,*TakeccTipslbl;
    UIButton *disableBtn,*administrativeBtn,*TakeccTipsBtn;
    UIButton *EditBtn,*DuplicateBtn,*DeleteBtn;
    
    UIButton *SaveEmployeeBtn,*CancelEmployeeBtn;
    UITableView *EditEmployeeTable;
   
    NSString *Disable,*administrative,*Cctips;
    NSMutableArray *EmDepartmentsArray,*EmployeeIdsArray,*passwordsArray,*DisplayNamesArray,*cardswipeidsArray,*EmCustomersArray,*houlrywagesArray,*disablesArray,*CctipsArray,*administativesArray ;
    NSString *CheckEmployeeID;
    
    //Personal Info View
    UIView *PersonalInfoPopupView;
    UIScrollView *PersonalInfoView;
    UILabel *PersonalInfotextlbl;
    UITextField *PersonalInfoField;
    UILabel *PersonalInfolbl;
    UIButton *SavePersonalInfoBtn,*CancelPersonalInfoBtn;
    NSString *Name,*ID,*Email,*Phonenumber,*Birthday,*Address,*City,*Country,*state,*Zipcode;
    NSMutableArray *NamesArray,*IDsArray,*EmailsArray,*PhonenumbersArray,*BirthdaysArray,*AddresssArray,*CitysArray,*CountrysArray,*statesArray,*ZipcodesArray;
    
    //Payroll View
    
    UIView *PayrollPopUpView;
    UIScrollView *PayrollView;
    UIButton *ExcludeBtn;
    UILabel *Excludelbl;
    UILabel *PayrollLbl,*PayrollTextLbl;
    UITextField *PayrollField;
    UILabel *Exemptlbl,*FillingStatuslbl;
    UIButton *ExemptBtn,*FillingBtn,*SavePayrollBtn,*CancelPayrollBtn;
    UITableView *ExemptsTable,*FillingsTable;
    NSString *Exclude,*federal,*federalAmount,*stateallowances,*stateAmount,*credits,*Exempt,*Filling;
    NSMutableArray *ExemptsArray,*FillinsArray;
    
    NSMutableArray *ExcludesArray,*federalsArray,*federalAmountsArray,*stateallowancessArray,*stateAmountsArray,*creditssArray,*DataExemptsArray,*DataFillingsArray;

    //Permissions View
    UIView *PermissionsPopupView;
    UIScrollView *PermissionsView;
    UILabel *PermissonsTextlbl,*PermissionLbl,*Permissionlbl2;
    UISwitch *Myswitch,*SecondSwitch;
    UIButton *SavePermissionBtn,*CancelPermissionsBtn;
    NSString *inventory,*reports,*settings,*allowexit,*deleteitems,*endTransactions,*forceCreditcard,*customers,*invoicediscounts,*pricechnages,*payouts,*voidinvoices,*hold,*endcash;
    
    NSMutableArray *inventorysArray,*reportssArray,*settingssArray,*allowexitsArray,*deleteitemssArray,*endTransactionssArray,*forceCreditcardsArray,*customerssArray,*invoicediscountssArray,*pricechnagessArray,*payoutssArray,*voidinvoicessArray,*holdsArray,*endcashsArray;
    
    NSInteger SelectedEmployee;
    UIAlertView *DeleteEmployeeAlert;
    
 //Edit Employee View
    UIView *EditEmployeePopUp;
    UIScrollView *EditemployeeView;
    
    UIButton *EditDepartmentBtn;
    UILabel *EditEmployeeIdLbl,*EditPasswordlbl,*EditDisplaynamelbl,*EditCardSwipeIdlbl,*EditCustomerLbl,*EditHoulrywagelbl,*EditDepartmentlbl;
    UITextField *EditEmployeeIdField,*EditPasswordField,*EditDisplaynameField,*EditCardSwipeIdField,*EditCustomerField,*EditHoulrywageField;
    UIButton *EditEmployeeInfoBtn;
    UITableView *EditDepartmentListTable;
   
    UILabel *EditDisablelbl,*Editadministrativelbl,*EditTakeccTipslbl;
    UIButton *EditdisableBtn,*EditadministrativeBtn,*EditTakeccTipsBtn;
     UIButton *EditSaveEmployeeBtn,*EditCancelEmployeeBtn;
    
 //Duplicate Employee View;
    
    UITextField *DuplicateEmployeeIdField;
    
    
    NSURLConnection *EConnection,*PermissionsConnection,*PayrollConnections,*PersonalConnection,*StoreConnection;
    NSMutableData *EResponseData,*PermissionsResponseData,*PayrollResponseData,*PersonalResponseData,*StoreResponseData;
    
    //Stores View
    
    UIView *StoresPopupView,*StoresView;
    UILabel *Storeslbl,*StoresTextlbl;
    UITableView *StoresListTable,*StoresDataTable;
    UIButton *SavestoresBtn,*CancelStoresBtn,*StoresBtn,*DeleteStoreBtn;
    NSMutableArray *StoreDataArray,*SelectedStoredataArray,*StoreIdsArray,*SeleCtedStoreIdsArray;
    NSMutableArray *StoredataFromdatabaseArray,*DBstorenamesArray,*BdStoreidsArray;
    
    
     UILabel *sationLbl,*Timelbl,*EmpIdlbl;
    UIButton *logoBtn;
    
    
    NSString *EmpPassword;
    
    UILabel *leavePasswordlbl;
    NSMutableDictionary *dataDict;
    
    IBOutlet EmployeeCell *employeeCell;
    
    
}
-(void)releaseViews;
- (IBAction)employee_editButtonClicked:(id)sender;
- (IBAction)employee_duplicateButtonClicked:(id)sender;
- (IBAction)employee_deleteButtonClicked:(id)sender;
@end
